package com.qf.huigou.entity;

import java.util.List;

public class Page<T> {

    public static final int PAGE_ROWS = 8;
    public int currentPage;
    public List<T> data;
    public int pageCounts;
    public int totalCounts;

    public Page() {
    }

    public Page(int currentPage, List<T> data, int pageCounts, int totalCounts) {
        this.currentPage = currentPage;
        this.data = data;
        this.pageCounts = pageCounts;
        this.totalCounts = totalCounts;
    }

    public static int getPageRows() {
        return PAGE_ROWS;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getPageCounts() {
        return pageCounts;
    }

    public void setPageCounts(int pageCounts) {
        this.pageCounts = pageCounts;
    }

    public int getTotalCounts() {
        return totalCounts;
    }

    public void setTotalCounts(int totalcounts) {
        totalCounts = totalcounts;
    }

    @Override
    public String toString() {
        return "Page{" +
                "currentPage=" + currentPage +
                ", data=" + data +
                ", pageCounts=" + pageCounts +
                ", totalCounts=" + totalCounts +
                '}';
    }
}
